<script type="text/javascript">
	$(function() {
	    $.fn.dataGridOptions.formSubFun("#form",'/modules/additional/experienceRule/doModify.html',"修改成功！","修改失败！");
	});
</script> 
<form id="form"  method="post">
<div class="popForm sForm">
   	<input type="hidden" name="id" value="${experienceRule.id}">
   	<input type="hidden" name="addTime" value="<#if experienceRule.addTime?? >${experienceRule.addTime?string('yyyy-MM-dd HH:mm:ss')}</#if>">
   	<input type="hidden" name="quotaYes" value="${experienceRule.quotaYes!}">
	<div class="formitm">
		<label class="lab">名称：</label>
		<div class="ipt"><input type="text" name="name" value="${experienceRule.name}" style="width:120px;" class="name easyui-validatebox" data-options="required: true,validType:'maxLength[15]'" maxlength="15"></div>
	</div>
	<div class="formitm">
		<label class="lab">金额：</label>
		<div class="ipt"><input type="text" name="amount" value="${experienceRule.amount}" style="width:60px;" onkeyup="this.value=this.value.replace(/[^0-9.]/g,'')" class="amount easyui-validatebox int_figure_required" data-options="required: true,validType:['numOnly','accout[1,10000]']" maxlength="5">元</div>
	</div>
	<div class="formitm">
			<label class="lab">有效期：</label>
			<div class="ipt"><input type="text" name="validTime" value="${experienceRule.validTime}" style="width:60px;" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" class="validTime easyui-validatebox int_figure_required" data-options="required: true, validType:'numOnly'" maxlength="3">天</div>
		</div>
	<div class="formitm">
		<label class="lab">名额：</label>
		<div class="ipt"><input type="text" name="quota" value="${experienceRule.quota}" style="width:60px;" onkeyup="this.value=this.value.replace(/[^0-9]/g,'')" class="quota easyui-validatebox int_figure_required" data-options="required: true, validType:'numOnly'" maxlength="6">份</div>
	</div>
	<div class="formitm">
		<label class="lab">已发放：</label>
		<div class="ipt">${experienceRule.quotaYes}</div>
	</div>
	<div class="formitm">
		<label class="lab">状态：</label>
		<div class="ipt">
			<select name="status" id="status">
				<option value="0" <#if experienceRule.status==0>selected="selected"</#if>>未启用</option>
				<option value="1" <#if experienceRule.status==1>selected="selected"</#if>>启用</option>
			</select>
		</div>
	</div>
</div>
</form>
<script>
	//输入框要求必须为整数数字
	$('.int_figure_required').bind('keyup blur', function() {
	    // 不能输入 类似00、01、0000001的数值
		  	if($(this).val().match(/^0+\d+/)){
	        this.value = $(this).val().replace(/^0+(\d+)/, '$1');
	    }
		  	
	});
</script>